import {showSnapshot,showSnapshot1} from "../service/snapshot"
export default {
    namespaced: true,
    state: {
        snapshots: [],
        pagination: {},
    },
    mutations: {
        setSnapshots(state, snapshots) {
            state.snapshots = snapshots;
        },
        setPagination(state, pagination) {
            state.pagination = pagination;
        }
    },
    actions: {
        async showSnapshot(context, pageParam) {
            let response = await showSnapshot(pageParam);
            context.commit("setPagination", response);
            context.commit("setSnapshots", response.list);
        },
        async showSnapshot1(context, pageParam) {
            let response = await showSnapshot1(pageParam);
            context.commit("setPagination", response.data);
            context.commit("setSnapshots", response.data.list);
        }
    }
}